package wwj.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import wwj.bean.CommodityBean;
import wwj.bean.HomeData;
import wwj.dao.CommodityDao;

import java.util.ArrayList;
import java.util.List;

public class HomePageService {
    public static void prepareHomeData(HomeData homeData){
        // 搜索框有值使用搜索查询
        if (homeData.getKeyWord().equals("")){
            CommodityDao.selectHomeDateBySort(homeData);
        }else {
            CommodityDao.selectBySearch(homeData);
        }
    }
}
